<template>
	<view style="opacity: 1;">
		<view class="flex-shrink" style="height:130rpx;"></view>
		<view class="fixed-top flex align-end justify-center bg-light" style="height: 130rpx;">
			<uni-icons v-if="gi>1&&!isSubmit" @click="handleBack()" type="left" style="position: absolute;left: 20rpx; bottom: 20rpx;" size="25"></uni-icons>
			<uni-icons v-if="isSubmit" @click="handleSubmit()" type="left" style="position: absolute;left: 20rpx; bottom: 20rpx;" size="25"></uni-icons>
			<text class="font pb-2">{{tabName}}</text>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	export default {
		data() {
			return {
				gi:1,
			}
		},
		props:{
			tabName: { //总计金额
				type: String,
				default: ''
			},
			isSubmit:{
				type:Boolean,
				default: false
			}
		},
		methods: {
			handleBack(){//后退
				uni.navigateBack()
			},
			handleSubmit(){//提交
				this.$emit('submit');
			}
		},
		mounted() {
			this.gi = getCurrentPages().length
		}
	}
</script>

<style>
	
</style>